<article class="grid_16">
    <div class="padding-top2">
        <div class="box-list">
            <?php if(count($posts) > 0): ?>
            <?php $i = 0; ?>
                <?php foreach ($posts as $key => $post): ?>
                <?php if($i < 3): ?>
                	<div class="box-3">
                    	<div class="pic-block">
                        	<div class="img-container">
                            	<img src="<?php echo Yii::app()->theme->baseUrl ?>/images/<?php echo $post->image; ?>" alt="" />
                            </div>
                            <div class="mask-1">
                            	<img src="<?php echo Yii::app()->theme->baseUrl ?>/images/<?php echo $post->image; ?>" alt="" />
                            </div>
                        </div>
                        <div class="extra-wrap">
                        	<h5 class="p0"><?php echo $post->title; ?></h5>
                            <?php echo substr($post->content, 0, 100); ?>... <a class="link-1" href="<?php echo Yii::app()->createAbsoluteUrl('Post/View', array('post_id' => $post->id)) ?>">More</a>
                        </div>
                    </div>
                <?php endif; $i ++; ?>
                <?php endforeach; ?>
            <?php else: ?>
                There is nothing to show now!
            <?php endif; ?>
        </div>
    </div>
</article>